package com.polaris.live.adapter

import com.bumptech.glide.Glide
import com.polaris.live.common.adapter.BaseBindingAdapter
import com.polaris.live.common.adapter.VBViewHolder
import com.polaris.live.databinding.AdapterLivesEndRecommendBinding
import com.polaris.live.resp.back_resp.DisplayUserBean
import com.polaris.live.utils.image.ImageUtils

/**
 * SpectatorEndAdapter
 *
 * @author Created by 半仙 on 2023/11/2/002 10:40
 */
class SpectatorEndAdapter :
    BaseBindingAdapter<AdapterLivesEndRecommendBinding, DisplayUserBean>() {

    override fun convert(
        holder: VBViewHolder<AdapterLivesEndRecommendBinding>,
        item: DisplayUserBean,
    ) {
        holder.vb.apply {
            Glide.with(cover.context).load(ImageUtils.imgPath(item.cover)).into(cover)
            svState.setState(item.base, item)
        }
    }

}